Delete Files
A Delete
Files section lists the files to be deleted. The file-list-section
name must appear in the Delfiles item of an Install
[file-list-section]
file-name[,,,flag]
.
.
.
file-name
Identifies a
file to be deleted. File-name must be defined in a SourceDisksFiles
section.
flag
Optional.
These flags can be used to control how files are copied. You must specify the
actual numerical value in the INF file.
DELFLG_IN_USE (0x00000001)
If the file
is in use when SetupCommitFileQueue is called, queue the file to be deleted
when the system is rebooted.
Note If you do not
use this flag along with a file-name parameter and the file is in use
when the Delete Files section is executed, the file will not be deleted
from the system.
DELFLG_IN_USE1 (0x00010000)
This flag is
a high-word version of the DELFLG_IN_USE. Setting DELFLG_IN_USE1 causes the
same behavior as setting DELFLG_IN_USE with the difference that it enables you
to use the same section as both a Copy Files94WX0. and Delete Files section without causing
conflicts if the COPYFLG_WARN_IF_SKIP flag is used.
The following
example deletes three files:
[DeleteOldFilesSec]
file1
file2
file3